﻿using System;
using System.Runtime.InteropServices;
using Microsoft.VisualStudio.Project;
using Microsoft.VisualStudio.Project.Automation;

namespace RiftAddonStudio.Project.Automation
{
    /// <summary>
    /// Rift project properties automation object.
    /// </summary>
    [ComVisible(true)]
    public class OARiftProjectProperties : OAProperties
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="OARiftProjectProperties"/> class.
        /// </summary>
        /// <param name="nodeProperties">The node properties.</param>
        internal OARiftProjectProperties(NodeProperties nodeProperties)
            : base(nodeProperties)
        {
            AddProperties();
        }

        /// <summary>
        /// Initialize properties by names, which defined in property page tag.
        /// </summary>
        private void AddProperties()
        {
            foreach (string tag in Enum.GetNames(typeof(GeneralPropertyPageTag)))
            {
                if (!Properties.ContainsKey(tag))
                    Properties.Add(tag, new OARiftProjectProperty(this, tag));
            }
        }
    }
}
